package com.bocai.open.api;

import com.bocai.Response;
import com.bocai.open.service.OpenService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * @author create by VIC.Huang
 * @date 2018/3/9
 */
@RestController
@RequestMapping("/open")
public class OpenApi {
    @Autowired
    private OpenService openService;

    @GetMapping("/dailyWinRank")
    public Response dailyWinRank() {
        return new Response(openService.getDailyWinRank());
    }

    @GetMapping("/weekWinRank")
    public Response weekWinRank() {
        return new Response(openService.getWeekWinRank());
    }

    @GetMapping("/monthWinRank")
    public Response monthWinRank() {
        return new Response(openService.getMonthWinRank());
    }
}
